import pandas as pd
from sklearn.model_selection import train_test_split

# data_name = 'data'
data_name = 'kaggle_long'
# data_name = 'kaggle_long'
# data_name = 'outcome1_short'
# data_name = 'outcome1_long'

data_file = './data/' + data_name + '.csv'
model_save_path = './model_hub/resultModel_' + data_name
# model_save_path = './model_hub/resultModel_' + data_name + '_LeakyReLu'
# model_save_path = './model_hub/resultModel_' + data_name + '_ReLu'
# model_save_path = './model_hub/resultModel_' + data_name + '_Softplus'
result_save_path = './' + data_name + '_evaluateResult.txt'

checkpoints_path = './model_hub/resultModel_' + data_name + '_checkpoints'
epochs = 60

sen_length = 512  # 单句最大长度

tolerance = 0.15  # 评估偏差容忍度


def get_data(datas):
    data = pd.read_csv(datas, sep='\t', header=None, names=['index', 's1', 's2', 'label'])
    # 获取数据和标签,DataFrame转list
    x = data[['s1', 's2']].values.tolist()
    y = data['label'].values.tolist()
    # 划分训练集和测试集
    x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=123, shuffle=True)
    return x_train, x_test, y_train, y_test


if __name__ == '__main__':
    x_train, x_test, y_train, y_test = get_data()
